#ifndef SESSION_MGR_H
#define SESSION_MGR_H
#include <net_module.h>
#include <boost/pool/object_pool.hpp>
#include <singleton.h>

class CSessionEventHandler;
class CSessionMgr : public utility::network::session_mgr, public CSingleton<CSessionMgr>
{
    friend CSingleton<CSessionMgr>;
    typedef boost::object_pool<CSessionEventHandler> TEventHandlerPool;
public:
    // handle the event when established
    virtual void on_accept(utility::network::session *);    
    // recycle event handler
    void RecycleEventHandler(CSessionEventHandler *);
private:
    TEventHandlerPool m_EventHandlers;
};

#endif  // endif of SESSION_MGR_H
